
#ifndef _GDT_H
#define _GDT_H
#include <stdint.h>
#include <stddef.h>

struct gdt 
{
    uint16_t segment;
    uint16_t base_first; 
    uint8_t base; 
    uint8_t access; 
    uint8_t high_flags; 
    uint8_t base_24_31_bits; 
}
__attribute__((packed));

struct gdt_structured
{
    uint32_t base;
    uint32_t limit; 
    uint8_t type; 
}
__attribute__((packed));

void gdt_load(struct gdt* gdt, const size_t size);
void gdt_structured_to_gdt(struct gdt* gdt, struct gdt_structured* structured, const size_t total_entries); 


#endif